package com.ruoyi.project.check.service.Impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.project.check.domian.Hoscheck;
import com.ruoyi.project.check.mapper.HoscheckMapper;
import com.ruoyi.project.check.service.IHoscheckservice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class IHoscheckserviceImpl implements IHoscheckservice {
    @Autowired
    private HoscheckMapper hoscheckMapper;

    /**
     * 页面数据显示
     * @param hoscheck
     * @return
     */
    @Override
    public List<Hoscheck> selectHosChecklist(Hoscheck hoscheck) {
        return hoscheckMapper.selectHosChecklist(hoscheck);
    }

    /**
     *查询结果录入
     * @param hoscheck
     * @return
     */
    @Override
    public int insertHosCheck(Hoscheck hoscheck) {
        hoscheck.setCreateTime(DateUtils.getNowDate());
        return hoscheckMapper.insertHosCheck(hoscheck);
    }

    @Override
    public Hoscheck selectHosCheckById(Long checkId) {
        return hoscheckMapper.selectHosCheckById(checkId);
    }

    @Override
    public int updateHosCheck(Hoscheck hoscheck) {
        return hoscheckMapper.updateHosCheck(hoscheck);
    }
}
